package ${packages.entity};

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
<#if createValidationImports?has_content>
<#list createValidationImports as importItem>
import ${importItem};
</#list>
</#if>

/**
 * ${moduleDisplayName} 实体
 * ${moduleSummary}
<#if options.author??>
 * 作者：${options.author}
</#if>
 */
@Data
@TableName(value = "${classInfo.tableName}")
public class ${classInfo.className} implements Serializable {

<#assign idFieldName = options.primaryFieldName?default(classInfo.fieldList[0].fieldName)>
<#assign idColumnName = options.primaryColumnName?default(classInfo.fieldList[0].columnName)>
<#assign idStrategy = options.primaryIdType?default("ASSIGN_ID")>
<#list classInfo.fieldList as field>
<#assign fieldDescription = (field.fieldComment?has_content)?then(field.fieldComment?trim?replace('\n', ' '), field.fieldName)>
<#if field.fieldName == idFieldName>
    @TableId(value = "${idColumnName}"<#if idStrategy?has_content>, type = IdType.${idStrategy?upper_case}</#if>)
</#if>
    @Schema(description = "${fieldDescription}")
    private ${field.fieldClass!"String"} ${field.fieldName};
</#list>

}
